package cn.iocoder.yudao.module.of.dal.mysql.userremindsetup;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.of.dal.dataobject.userremindsetup.UserRemindSetupDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.of.controller.admin.userremindsetup.vo.*;

/**
 * 日程提醒设置 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface UserRemindSetupMapper extends BaseMapperX<UserRemindSetupDO> {

    default PageResult<UserRemindSetupDO> selectPage(UserRemindSetupPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<UserRemindSetupDO>()
                .eqIfPresent(UserRemindSetupDO::getUserId, reqVO.getUserId())
                .eqIfPresent(UserRemindSetupDO::getIsRemind, reqVO.getIsRemind())
                .eqIfPresent(UserRemindSetupDO::getScheduleCategory, reqVO.getScheduleCategory())
                .betweenIfPresent(UserRemindSetupDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(UserRemindSetupDO::getId));
    }

}